//自定义系统token前端存储时的名称
const TokenKey = window.HC_config && window.HC_config.VUE_SYSTEM_TOKEN || 'Admin-Token';
const SsoAccessToken = window.HC_config && window.HC_config.VUE_APP_SSO_ACCESS_TOKEN || "Sso-Access-Token";

// 获取系统token
export function getToken() {
    return localStorage.getItem(TokenKey);
}

// 设置系统token
export function setToken(token) {
    return localStorage.setItem(TokenKey, token);
}

// 移除系统token
export function removeToken() {
    return localStorage.removeItem(TokenKey);
}

// 获取单点登录token
export function getSSOToken() {
    return localStorage.getItem(SsoAccessToken);
}

// 设置单点登录token
export function setSSOToken(token) {
    return localStorage.setItem(SsoAccessToken, token);
}

// 移除单点登录token
export function removeSSOToken() {
    return localStorage.removeItem(SsoAccessToken);
}
